/* * Copyright 2024, T-Mobile * Package Name: business-kpi-manager-1.0.0 * Commit Hash: f716d913ae657cc40f5f446d3e88f4224d54fcfa * Build Date: Thu, 09 May 2024 18:45:14 GMT */ (()=>{"use strict";var e={807:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProspectQualityTraffic=t.ProspectShoppingVisit=t.BuyingInterest=t.BuyingIntent=t.EngagedVisit=t.customEvents=t.windowVariables=t.PageAndTimeKeys=t.LineOfBusiness=t.dataLayerConstants=t.common=void 0,t.common={lob:"global",debug_Key:"tmoDblg",storageKeyName:"KPI_Config",maxTimeCalculation:24e4,timerInterval:2e3,CLICK_EVENT:"click",DOM_READY_STAGE_CHANGE:"readystatechange",DOM_COMPLETE:"complete",BUTTON_SAVE:"save",MODAL_SAVE:"save cart"},t.dataLayerConstants={page:"page",pageInfo:"pageInfo",pageName:"pageName",Get_Started_HCC:"Get Started HCC",Personal_Information_SCC:"Personal Information SCC"},t.LineOfBusiness={BIZIL:"bizil",PREPAID:"prepaid",METRO:"metro",TMO:"tmobile",TFB:"business",HINT:"hint"},t.PageAndTimeKeys={TIME_SPENT_IN_SESSION_KEY:"KPI_TimeSpentOnPage",VISITED_PAGE_LIST_SESSION_KEY:"KPI_Visited_Pages",VISITED_PAGE_COUNT_SESSION_KEY:"KPI_Visited_Page_Count",TFB_TIME_SPENT_IN_SESSION_KEY:"KPI_TimeSpentInSession_TFB",TFB_VISITED_PAGE_LIST_SESSION_KEY:"KPI_Visited_Pages_TFB",TFB_VISITED_PAGE_COUNT_SESSION_KEY:"KPI_Visited_Page_Count_TFB",HINT_TIME_SPENT_IN_SESSION_KEY:"KPI_TimeSpentInSession_HINT",HINT_VISITED_PAGE_LIST_SESSION_KEY:"KPI_Visited_Pages_HINT",HINT_VISITED_PAGE_COUNT_SESSION_KEY:"KPI_Visited_Page_Count_HINT",TMO_TIME_SPENT_IN_SESSION_KEY:"KPI_TimeSpentInSession_TMO",TMO_VISITED_PAGE_LIST_SESSION_KEY:"KPI_Visited_Pages_TMO",TMO_VISITED_PAGE_COUNT_SESSION_KEY:"KPI_Visited_Page_Count_TMO",METRO_TIME_SPENT_IN_SESSION_KEY:"KPI_TimeSpentInSession_Metro",METRO_VISITED_PAGE_LIST_SESSION_KEY:"KPI_Visited_Pages_Metro",METRO_VISITED_PAGE_COUNT_SESSION_KEY:"KPI_Visited_Page_Count_Metro",PREPAID_TIME_SPENT_IN_SESSION_KEY:"KPI_TimeSpentInSession_Prepaid",PREPAID_VISITED_PAGE_LIST_SESSION_KEY:"KPI_Visited_Pages_Prepaid",PREPAID_VISITED_PAGE_COUNT_SESSION_KEY:"KPI_Visited_Page_Count_Prepaid",BIZIL_TIME_SPENT_IN_SESSION_KEY:"KPI_TimeSpentInSession_Bizil",BIZIL_VISITED_PAGE_LIST_SESSION_KEY:"KPI_Visited_Pages_Bizil",BIZIL_VISITED_PAGE_COUNT_SESSION_KEY:"KPI_Visited_Page_Count_Bizil"},t.windowVariables={MT_KPI_digitalData:"digitalData",MT_KPI_satellite:"_satellite",MT_KPI_alloy:"alloy",MT_KPI_phoenix:"phoenix",MT_KPI_TA:"ta",MT_KPI_TAGANALYTICS:"tagAnalytics",MT_KPI_TM_EXECUTED:"MT_TM_Executed"},t.customEvents={MT_KPI_cdlPageLoadEvent:"cdlPageLoadEvent",MT_KPI_targetPageLoad:"TargetPageLoad",MT_KPI_chatData:"chatData",MT_KPI_chatEngagementTracking:"chatEngaged"},t.EngagedVisit={name:"EngagedVisit",newCustomer:{timeCount:5e3,expirationTime:30},timerConfiguration:{name:"EngagedVisit",userType:"BOTH",timerList:[{timeCount:5e3,hasBeenTriggered:!1}],customEventName:"EV_TimerMet",isKPIFired:"KPI_EngagedVisitFired"},isKPIFired:"KPI_EngagedVisitFired",storageKeyName:"KPI_EV",consumerSignal:"Conditional_Engaged_Session_Visit",adobeLinkMessage:"Engaged Visit",prodUrl:[{Domain:/metrobyt-mobile.com/,Exclude:"",Include:"ALL"},{Domain:/www.t-mobile.com/,Exclude:"",Include:"ALL"},{Domain:/es.t-mobile.com/,Exclude:"",Include:"ALL"},{Domain:/my.t-mobile.com/,Exclude:"ALL",Include:""},{Domain:/prepaid.t-mobile.com/,Exclude:"",Include:"ALL"},{Domain:/now.t-mobile.com/,Exclude:"",Include:"ALL"}],Phoenix:{adobeSchema:{pageEventType:"engagedVisit"}},adobe:{events:"event157",linkMessage:"Engaged Visit"}},t.BuyingIntent={name:"Buying Intent",kpiFlag:"sentKpiSignal",timeToReset:864e5,EXTERNAL_BUYING_INTENT_EVENT:"check_BIntent",storageKeyName:"KPI_buyingIntent",isKPIFired:"",consumerSignal:"Fire_BIntent",prodUrl:[{Domain:/www.t-mobile.com/,Exclude:"",Include:"ALL"}],Phoenix:{adobeSchema:{pageEventType:"buyingIntent"}},adobe:{linkMessage:"Buying Intent",trackLink:'a[href^="tel"]',prop72_V1:"BIntent:ClickToCall",prop72_V2:"BIntent:PreScreenVerifyID",prop72_V3:"BIntent:HardCreditCheck",eventType_V3_urlCondition:[{Domain:/www.t-mobile.com/,Exclude:"",Include:[/^\/checkout*/]}],prop72_V4:"BIntent:SaveCart",eventType_V4_urlCondition:[{Domain:/www.t-mobile.com/,Exclude:"",Include:[/^\/cart*/]}],prop72_V5:"BIntent:LPChat",eventListener_V5:"chatData",BI_STORE_DIRECTIONS_EVENT_TYPE:"sd",prop72_V6:"BIntent:StoreDirections",outcome:"",eventType_V4_Interval:1e3,events:"event187"}},t.BuyingInterest={name:"Buying Interest",global:{repeatCustomer:{pageCountA:11,pageCountB:4,timeCountA:112e3},newCustomer:{pageCountA:8,pageCountB:3,timeCountA:196e3}},timerConfiguration:{name:"BuyingInterest",userType:"prospect",timerList:[{timeCount:196e3,hasBeenTriggered:!1},{timeCount:112e3,hasBeenTriggered:!1}],customEventName:"BuyingInterest_TimerMet",hasBeenTriggered:!1,isKPIFired:"isAPSVFired"},prodUrl:[{Domain:/www.t-mobile.com/,Exclude:[/^\/support*/],Include:"ALL"},{Domain:/es.t-mobile.com/,Exclude:[/^\/support*/],Include:"ALL"},{Domain:/metrobyt-mobile.com/,Exclude:[/^\/(payment|guestpay).*?/],Include:"ALL"},{Domain:/digital-stage.metrobyt-mobile.com/,Exclude:"",Include:"ALL"}],isKPIFired:"isAPSVFired",storageKeyName:"KPI_Config",digitalDataprop:"allPageCount",consumerSignal:"KPI_APSV",lob:"global",storageType:"localStorage",daysToExpire:30,timetoRefresh:864e5,defaultConfig:{global:{initialDate:"",recentDate:"",session_page_count:0,session_time_count:0,total_page_counts:0,total_time_counts:0,visits:1}},Phoenix:{adobeSchema:{pageEventType:"activeProspectShoppingVisit"}},adobe:{prop72_V1:"BI:F1",prop72_V2:"BI:F2",prop72_V3:"BI:R1",prop72_V4:"BI:R2",events:"event226",linkMessage:"activeProspectShoppingVisit",debugTestPageEvent:"activeprospectshoppingvisittest",debugTestConsumerSignal:"Fire_APSVTest"}},t.ProspectShoppingVisit={name:"Prospect Shopping Visit",newCustomer:{pageCount:2,timeCount:2e4},timerConfiguration:{userType:"prospect",pageCount:2,timerList:[{timeCount:2e4,hasBeenTriggered:!1}],customEventName:"PSV_TimerMet"},isKPIFired:"KPI_PSVFired",storageKeyName:"KPI_Config",consumerSignal:"KPI_PSV",prodUrl:[{Domain:/www.t-mobile.com/,Exclude:[/^\/support*/],Include:"ALL"},{Domain:/es.t-mobile.com/,Exclude:[/^\/support*/],Include:"ALL"},{Domain:/metrobyt-mobile.com/,Exclude:[/^\/payment*/],Include:"ALL"},{Domain:/now.t-mobile.com/,Exclude:"",Include:"ALL"},{Domain:/digital-stage.metrobyt-mobile.com/,Exclude:"",Include:"ALL"}],Phoenix:{adobeSchema:{pageEventType:"prospectShoppingVisit"}},adobe:{events:"",linkMessage:"prospectShoppingVisit"},adobeLinkMessage:"prospectShoppingVisit"},t.ProspectQualityTraffic={defaultConfig:{global:{initialDate:"",recentDate:"",session_page_count:0,session_time_count:0,total_page_counts:0,total_time_counts:0,visits:1}},global:{newCustomer:{pageCountA:8,pageCountB:3,timeCountA:196e3},repeatCustomer:{pageCountA:11,pageCountB:4,timeCountA:112e3}},resetDate:30,timeToRefresh:864e5,prodUrl:[{Domain:/www.t-mobile.com/,Exclude:[/^\/support*/],Include:"ALL"},{Domain:/es.t-mobile.com/,Exclude:[/^\/support*/],Include:"ALL"},{Domain:/metrobyt-mobile.com/,Exclude:[/^\/(payment|guestpay).*?/],Include:"ALL"},{Domain:/now.t-mobile.com/,Exclude:"",Include:"ALL"},{Domain:/digital-stage.metrobyt-mobile.com/,Exclude:"",Include:"ALL"}],isKPIFired:"KPI_APSVFired"}},917:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.shouldLog=t.getLogger=t.error=t.debug=void 0;const n=i(867),o=i(807),s=a("KPI_MGR");function a(e){try{return{logd:window.console.debug.bind(window.console.debug,"["+e+"] "),loge:window.console.error.bind(window.console.error,"["+e+"] ")}}catch(e){console.debug("KPI: Error in the logging module")}}t.debug=function(...e){s.logd(...e)},t.error=function(...e){s.loge(...e)},t.getLogger=a,t.shouldLog=function(){try{return"true"===n.getCookie(o.common.debug_Key)}catch(e){return!1}}},964:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.QualityTraffic=t.BuyingInterest=t.ProspectShoppingVisit=t.TmobileCommon=void 0,t.TmobileCommon={brandKey:"tmobile",runClock:5e3},t.ProspectShoppingVisit={name:"Prospect Shopping Visit",newCustomer:{pageCount:2,timeCount:2e4},timerConfiguration:{name:"ProspectShoppingVisit",userType:"prospect",pageCount:2,timerList:[{timeCount:2e4,hasBeenTriggered:!1}],customEventName:"PSV_TimerMet",isKPIFired:"KPI_PSVFired"},isKPIFired:"KPI_PSVFired",consumerSignal:"Fire_PSV",storageKeyName:"KPI_Config",prodUrl:[{Domain:/www.t-mobile.com/,Exclude:[/^\/support*/],Include:"ALL"},{Domain:/es.t-mobile.com/,Exclude:[/^\/support*/],Include:"ALL"}],Phoenix:{adobeSchema:{pageEventType:"prospectShoppingVisit"}},adobe:{events:"event186",linkMessage:"prospectShoppingVisit"},adobeLinkMessage:"prospectShoppingVisit"},t.BuyingInterest={name:"Buying Interest",global:{repeatCustomer:{pageCountA:11,pageCountB:4,timeCountA:112e3},newCustomer:{pageCountA:8,pageCountB:3,timeCountA:196e3}},timerConfiguration:{name:"BuyingInterest",userType:"prospect",timerList:[{timeCount:196e3,hasBeenTriggered:!1},{timeCount:112e3,hasBeenTriggered:!1}],customEventName:"BuyingInterest_TimerMet",isKPIFired:"isAPSVFired"},prodUrl:[{Domain:/www.t-mobile.com/,Exclude:[/^\/support*/],Include:"ALL"},{Domain:/es.t-mobile.com/,Exclude:[/^\/support*/],Include:"ALL"}],isMigrated:!1,isKPIFired:"isAPSVFired",storageKeyName:"KPI_Config",digitalDataprop:"allPageCount",consumerSignal:"Fire_APSV",lob:"global",storageType:"localStorage",daysToExpire:30,timetoRefresh:864e5,defaultConfig:{global:{initialDate:"",recentDate:"",session_page_count:0,session_time_count:0,total_page_counts:0,total_time_counts:0,visits:1}},Phoenix:{adobeSchema:{pageEventType:"activeProspectShoppingVisit"}},adobe:{prop72_V1:"BI:F1",prop72_V2:"BI:F2",prop72_V3:"BI:R1",prop72_V4:"BI:R2",events:"event185",linkMessage:"activeProspectShoppingVisit"}},t.QualityTraffic={name:"Quality Traffic",brandKey:"BTS",KPI_Session:{pageCount:0,timeCount:0},newCustomer:{pageCount:1,timeCount:6e4},repeatCustomer:{pageCount:2,timeCount:15e3},timerConfiguration:{name:"Quality Traffic",userType:"BOTH",timerList:[{timeCount:6e4,hasBeenTriggered:!1},{timeCount:15e3,hasBeenTriggered:!1}],customEventName:"QT_TimerMet",isKPIFired:"isBTSQTFired"},includePageCount:!0,isKPIFired:"isBTSQTFired",consumerSignal:"Fire_BTS_QT",consumerSignalTest:"Fire_TestBTSQT",supplementActions:"ADDTOCART_NOTIFY",storageKeyName_pagCountTrack:"KPI_pageCountTrack",storageKeyName_pageUrlTrack:"KPI_pageUrlTrack",storageKeyName:"KPI_Session",prodUrl:[{Domain:/www.t-mobile.com/,Exclude:"",Include:[/\/tablet/,/\/tablets/,/\/smart-watch/,/\/smart-watches/,/\/internet-device/,/\/internet-devices/,/\/iot-device/,/\/iot-devices/,/\/hotspots-iot-connected-devices/]}],Phoenix:{adobeSchema:{pageEventType:"qualityTraffic"}},adobe:{prop72_V1:"BTSQT:L1PA",prop72_V2:"BTSQT:L1PB",prop72_V3:"TestBTSQT:L2A",events:"event226",linkMessage:"Quality Traffic"}}},217:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.commonLogMessages=t.BUYING_INTENT_LOGMESSAGES=void 0,t.BUYING_INTENT_LOGMESSAGES={INITIATE_CONSUMER:" initConsumer called for prospect user",INITIAL_LOCALSTRG_VAL:" Local storage was initialized with its initial values",CLICK_TO_CALL_LINK:" Click to Call Link detected",CLICK_TO_CALL_CLICKED:"User clicked Click to Call Link",RECORD_DATA:"RecordDataFunction called, initializes now local storage values and calls sendKpiSignals",SAVE_CART:"User Saved Cart",NOT_PHOENIX_PAGE:"Not a Phoenix page",CREDIT_CHECK_FUNC:"Credit Check Tracking Func called",HCC_CONDITION_MET:"Hard Credit Check CONDITION MET",PRESCREENVERIFY_CONDITION_MET:"Prescreen verify ID CONDITION MET",SAVE_CART_CLICKED:"User clicked on Save Cart",SAVE_CART_MODAL_VISIBLE:"Save Cart Modal Visible",SAVE_CART_BUTTON_VISIBLE:"Save Cart Button Visible",SAVE_CART_BUTTON_CLICKED:"Save Cart Button Clicked By User",CHAT_ENGAGEMENT:"LivePerson Chat detected on the page",CHAT_ENGAGEMENT_CONDITION_MET:"User chat engagement CONDITION MET",DAY_LIMIT_ACHIEVED:" Local Storage cleared as the 14-day period condition was met"},t.commonLogMessages={NOT_FIRED:"not fired yet",FIRED_KPI:"already fired in this session",TAQ_EVENT_PUSHED:"Pushed an event to taq array",EVENT_TRIGGERED:"event triggered",SET_SESSION_FLAG:"has been triggered, resulting in the setting of the session storage flag"}},275:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BuyingIntentConsumer=void 0;const n=i(807),o=i(217),s=i(47),a=i(917),r=i(867);class u extends s.ConsumerBase{constructor(e="Buying Intent Consumer",t){super(),this.saveCartButtonVisible=!1,this.sentKpiSignal=!1,this.name=e,this.consumerConfig=t}initConsumer(){a.debug(this.name,o.BUYING_INTENT_LOGMESSAGES.INITIATE_CONSUMER),this.getBuyingIntentTime=r.getLocalStorageValue(this.consumerConfig.storageKeyName,!0),r.isObjEmpty(this.getBuyingIntentTime)?(a.debug(this.name,o.BUYING_INTENT_LOGMESSAGES.INITIAL_LOCALSTRG_VAL),r.setLocalStorageValue(this.consumerConfig.storageKeyName,{val:0,time:r.currentTime()})):(this.getBuyingIntentTime.time=r.currentTime(),r.setLocalStorageValue(this.consumerConfig.storageKeyName,this.getBuyingIntentTime)),this.verifyExpiration(),this.executeConditions(),this.sentKpiSignal||window.addEventListener(n.windowVariables.MT_KPI_TM_EXECUTED,function(){this.sentKpiSignal||this.isFired()||(this.sentKpiSignal=!0,this.executeConditions())}.bind(this))}executeConditions(){addEventListener(this.consumerConfig.adobe.eventListener_V5,this.chateventTracking.bind(this));document.querySelectorAll(this.consumerConfig.adobe.trackLink).forEach((e=>{e.addEventListener(n.common.CLICK_EVENT,this.clickToCallTracking.bind(this))})),a.debug(this.name,o.BUYING_INTENT_LOGMESSAGES.CLICK_TO_CALL_LINK),r.isPhoenixPage()||(this.creditCheckTracking(),r.urlChecker(this.consumerConfig.adobe.eventType_V4_urlCondition)&&this.saveCartTracking()),this.storageDirectionTracking()}verifyExpiration(){this.getBuyingIntentTime=r.getLocalStorageValue(this.consumerConfig.storageKeyName,!0),a.debug(`${this.name} :: verifyExpiration`),!r.isObjEmpty(this.getBuyingIntentTime)&&Math.round(Math.abs(r.currentTime()-this.getBuyingIntentTime.time)/this.consumerConfig.timeToReset)>14&&(r.removeLocalStorageValue(this.consumerConfig.storageKeyName),a.debug(this.name,o.BUYING_INTENT_LOGMESSAGES.DAY_LIMIT_ACHIEVED))}clickToCallTracking(e){this.isFired()||(a.debug(this.name,o.BUYING_INTENT_LOGMESSAGES.CLICK_TO_CALL_CLICKED),this.outcome=this.consumerConfig.adobe.prop72_V1,this.recordDataFunction(),removeEventListener(e.type,this.clickToCallTracking))}chateventTracking(e){if(!this.isFired()){a.debug(this.name,o.BUYING_INTENT_LOGMESSAGES.CHAT_ENGAGEMENT);const t=e.detail.eType;t===n.customEvents.MT_KPI_chatEngagementTracking&&0===r.getLocalStorageValue(this.consumerConfig.storageKeyName,!0).val&&(this.outcome=this.consumerConfig.adobe.prop72_V5,a.debug(this.name,o.BUYING_INTENT_LOGMESSAGES.CHAT_ENGAGEMENT_CONDITION_MET),this.recordDataFunction(),removeEventListener(t,this.chateventTracking))}}isFired(){if(1===r.getLocalStorageValue(this.consumerConfig.storageKeyName,!0).val)return a.debug(this.name,o.commonLogMessages.FIRED_KPI),!0}creditCheckTracking(){if(!this.isFired()){a.debug(this.name,o.BUYING_INTENT_LOGMESSAGES.CREDIT_CHECK_FUNC);const e=r.fetchDataLayerValue(r.getDataLayer()[n.dataLayerConstants.page],n.dataLayerConstants.pageName);(e===n.dataLayerConstants.Get_Started_HCC||r.urlChecker(this.consumerConfig.adobe.eventType_V3_urlCondition))&&(a.debug(this.name,o.BUYING_INTENT_LOGMESSAGES.HCC_CONDITION_MET),this.outcome=this.consumerConfig.adobe.prop72_V3),e===n.dataLayerConstants.Personal_Information_SCC&&(a.debug(this.name,o.BUYING_INTENT_LOGMESSAGES.PRESCREENVERIFY_CONDITION_MET),this.outcome=this.consumerConfig.adobe.prop72_V2),this.recordDataFunction()}}storageDirectionTracking(){window.addEventListener(this.consumerConfig.EXTERNAL_BUYING_INTENT_EVENT,function(e){!this.isFired()&&e.detail&&e.detail===this.consumerConfig.adobe.BI_STORE_DIRECTIONS_EVENT_TYPE&&(a.debug("Buying Intent Store Directions Clicked"),this.outcome=this.consumerConfig.adobe.prop72_V6,this.recordDataFunction())}.bind(this))}saveCartTracking(){window.addEventListener(this.consumerConfig.EXTERNAL_BUYING_INTENT_EVENT,function(){this.isFired()||(a.debug(this.name,o.BUYING_INTENT_LOGMESSAGES.SAVE_CART),this.outcome=this.consumerConfig.adobe.prop72_V4,this.recordDataFunction())}.bind(this))}recordDataFunction(){!this.isFired()&&this.outcome&&(a.debug(this.name,o.BUYING_INTENT_LOGMESSAGES.RECORD_DATA),r.setLocalStorageValue(this.consumerConfig.storageKeyName,{val:1,time:r.currentTime()}),this.consumerConfig.outcome=this.outcome,r.sendKpiSignals(this.consumerConfig))}getConsumerConfig(){return this.consumerConfig}}t.BuyingIntentConsumer=u,t.default=u},530:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BuyingInterestConsumer=void 0;const n=i(807),o=i(867),s=i(47),a=i(917);class r extends s.ConsumerBase{constructor(e,t){super(),this.userActivity=!1,this.sentKpiSignal=!1,this.elapsedTime=0,this.name=e,this.consumerConfig=t}initConsumer(){const e=o.getSessionStorageValue(n.PageAndTimeKeys.TIME_SPENT_IN_SESSION_KEY,!0,0);o.registerTimeSpent(n.common.lob,e,"localStorage",e)}getConsumerConfig(){return this.consumerConfig}initiateBuyingInterest(){try{a.debug(this.name,"session has been initiated :: initiateBuyingInterest"),window.addEventListener(this.consumerConfig.timerConfiguration.customEventName,function(){a.debug(this.name,"user met the default time needed to fire BuyingInterest KPI"),this.recordDataFunction()}.bind(this)),this.recordDataFunction()}catch(e){a.debug(this.name,"initiateBuyingInterest err",e)}}static updateTimer(){const e=o.getConfig();o.isObjEmpty(e)||(e[n.common.lob].session_time_count=o.getSessionStorageValue(n.PageAndTimeKeys.TIME_SPENT_IN_SESSION_KEY,!0,0),o.setLocalStorageValue("KPI_Config",e))}resetKPITimer(){o.isObjEmpty(o.getLocalStorageValue("global_StartTimer"))?o.setLocalStorageValue("global_StartTimer",o.currentTime()):o.diff(o.currentTime(),parseInt(o.getLocalStorageValue("global_StartTimer")),this.consumerConfig.timetoRefresh)>this.consumerConfig.daysToExpire&&(o.setLocalStorageValue("global_StartTimer",o.currentTime()),o.removeLocalStorageValue(this.consumerConfig.storageKeyName)),o.isObjEmpty(o.getSessionStorageValue("session_globalStartTimer"))&&(o.setSessionStorageValue("session_globalStartTimer",o.currentTime()),o.registerSessionVisit(n.common.lob,this.consumerConfig.defaultConfig,this.timeDiff))}recordDataFunction(){a.debug(this.name," :: Record Data Function");const e=o.urlChecker(this.consumerConfig.prodUrl);if(o.getSessionStorageValue(this.consumerConfig.isKPIFired,!0,!1)||!e)return;const t=o.getLocalStorageValue(this.consumerConfig.storageKeyName,!0,!1)[n.common.lob],i=o.cumulativeSessionProps(n.common.lob);let s="";1==i.global_totalVisits&&(t.session_page_count>=this.consumerConfig.global.newCustomer.pageCountA?s=this.consumerConfig.adobe.prop72_V1:t.session_page_count>=this.consumerConfig.global.newCustomer.pageCountB&&t.session_time_count>=this.consumerConfig.global.newCustomer.timeCountA&&(s=this.consumerConfig.adobe.prop72_V2)),i.global_totalVisits>1&&(i.global_totalPageCounts>=this.consumerConfig.global.repeatCustomer.pageCountA?s=this.consumerConfig.adobe.prop72_V3:i.global_totalPageCounts>=this.consumerConfig.global.repeatCustomer.pageCountB&&i.global_totalTimeSpent>=this.consumerConfig.global.repeatCustomer.timeCountA&&(s=this.consumerConfig.adobe.prop72_V4)),s&&(this.consumerConfig.outcome=s,o.sendKpiSignals(this.consumerConfig),a.debug(`${this.name} condition met`),a.debug(`${this.name} sent signals to CDL and event listener has been created`))}}t.BuyingInterestConsumer=r,t.default=r},47:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConsumerBase=void 0;t.ConsumerBase=class{}},447:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EngagedVisitConsumer=void 0;const n=i(807),o=i(867),s=i(47),a=i(917);class r extends s.ConsumerBase{constructor(e=n.EngagedVisit.name,t){super(),this.elapsedTime=0,this.expire=!0,this.clearLocalStorage=!1,this.name=e,this.consumerConfig=t}initConsumer(){o.isObjEmpty(o.getCookie(this.consumerConfig.storageKeyName))?(a.debug(this.name,"session has been initiated :: initiateEngagedVisit"),o.getSessionStorageValue(this.consumerConfig.isKPIFired,!0,!1)&&window.sessionStorage.removeItem(this.consumerConfig.isKPIFired),addEventListener(this.consumerConfig.timerConfiguration.customEventName,this.conditionMetHandler.bind(this)),addEventListener("click",this.conditionMetHandler.bind(this),{once:!0}),addEventListener("scroll",this.conditionMetHandler.bind(this),{once:!0})):a.debug(this.name,"has already fired, 30 min expiration time has not met")}conditionMetHandler(e){const t=e.type;a.debug(this.name,t,"condition satisfied"),this.recordDataFunction(t),removeEventListener(t,this.conditionMetHandler)}getDmn(){return window.location.hostname.split(".").slice(-2).join(".")}recordDataFunction(e){try{a.debug(this.name,":: Record Data Function");n.EngagedVisit.Phoenix.adobeSchema;o.isObjEmpty(o.getCookie(n.EngagedVisit.storageKeyName))&&(a.debug(this.name,e,"condition triggered Engaged Visit KPI"),this.clearLocalStorage=!0,o.setCookie(n.EngagedVisit.storageKeyName,1,30,null,"."+this.getDmn()),o.sendKpiSignals(this.consumerConfig))}catch(e){a.debug(e,this.name,":: Record Data Function failed")}}getConsumerConfig(){return this.consumerConfig}}t.EngagedVisitConsumer=r,t.default=r},51:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PSVConsumer=void 0;const n=i(807),o=i(867),s=i(47),a=i(917);class r extends s.ConsumerBase{constructor(e,t){super(),this.elapsedTime=0,this.userActivity=!1,this.expire=!0,this.clearLocalStorage=!1,this.name=e,this.consumerConfig=t}initConsumer(){o.getSessionStorageValue(this.consumerConfig.isKPIFired,!0,!1)?a.debug(this.name,"has fired already"):o.getSessionStorageValue(this.consumerConfig.isKPIFired,!0,!1)&&o.isUserProspect()?a.debug(this.name,"Skipped as current page is not valid"):(this.recordDataFunction(),window.addEventListener(this.consumerConfig.timerConfiguration.customEventName,function(){const e=o.getSessionStorageValue(n.PageAndTimeKeys.TIME_SPENT_IN_SESSION_KEY,!0,0);o.registerTimeSpent(n.common.lob,e,"localStorage",e),a.debug(this.name,"user met the default time needed to fire Prospect Shopping Visit KPI",e),this.recordDataFunction()}.bind(this)))}registerKPITimer(){const e=o.getSessionStorageValue(n.PageAndTimeKeys.TIME_SPENT_IN_SESSION_KEY,!0,0);o.registerTimeSpent(n.common.lob,e,"localStorage",e)}recordDataFunction(){a.debug(this.name," :: Record Data Function");const e=o.getLocalStorageValue(n.common.storageKeyName,!0,!1);if(!o.getSessionStorageValue(this.consumerConfig.isKPIFired,!0,!1)&&e&&e[n.common.lob]&&e[n.common.lob].session_page_count>=this.consumerConfig.newCustomer.pageCount&&e[n.common.lob].session_time_countB>=this.consumerConfig.newCustomer.timeCount){let e="";e=this.consumerConfig.adobe.linkMessage,o.sendKpiSignals(this.consumerConfig),a.debug(`${this.name} condition met`),a.debug(`${this.name} sent signals to CDL and event listener has been created`)}}getConsumerConfig(){return this.consumerConfig}}t.PSVConsumer=r,t.default=r},564:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.QualityTrafficConsumer=void 0;const n=i(47),o=i(917),s=i(867);class a extends n.ConsumerBase{constructor(e="Quality Traffic Consumer",t){super(),this.elapsedTime=0,this.digitalData=s.getDataLayer(),this.name=e,this.consumerConfig=t}initConsumer(){o.debug(this.name+" is being initiated")}setupPageCountAndTimeTracker(e){const t=s.recordPageUrlVisited(null,this.consumerConfig.pageNameKey,this.consumerConfig.pageCountKey),i=s.getLocalStorageValue(this.consumerConfig.localStorageKey,!0);if(s.isObjEmpty(i))this.initializeLocalStorageKey();else{const e=new Date(i.initialVisitDate),n=s.locale();if(s.numberOfDaysBetween(e,new Date(n))>=this.consumerConfig.MAX_DAYS_TO_TRACK)window.sessionStorage.removeItem(this.consumerConfig.pageCountKey),window.sessionStorage.removeItem(this.consumerConfig.pageNameKey),s.recordPageUrlVisited(null,this.consumerConfig.pageNameKey,this.consumerConfig.pageCountKey),this.initializeLocalStorageKey();else{const e=s.getSessionStorageValue(this.consumerConfig.pageCountKey,!0,1);i.recentVisitDate=n,e>=i.pageCount?i.pageCount=e:t&&i.pageCount++,s.setLocalStorageValue(this.consumerConfig.localStorageKey,i)}}const n=setInterval((()=>{var t;if(this.hasKPIAlreadyFired())return void clearInterval(n);const i=s.getLocalStorageValue(this.consumerConfig.localStorageKey,!0);i&&(this.elapsedTime=i.timeSpent+this.consumerConfig.QT_CLOCK_INTERVAL,i.timeSpent=this.elapsedTime,s.setLocalStorageValue(this.consumerConfig.localStorageKey,i),null===(t=this.consumerConfig.kpiTimeAndPageConditions)||void 0===t||t.forEach((t=>{if(this.elapsedTime>=t.timeSpent&&i.pageCount>=t.pageCount&&(t.includeHigherPageCounts||i.pageCount==t.pageCount))return e(t.type),void clearInterval(n)})))}),this.consumerConfig.QT_CLOCK_INTERVAL)}initializeLocalStorageKey(){s.removeLocalStorageValue(this.consumerConfig.localStorageKey);const e=s.locale(),t={initialVisitDate:e,recentVisitDate:e,pageCount:s.getSessionStorageValue(this.consumerConfig.pageCountKey,!0,1),timeSpent:0};s.setLocalStorageValue(this.consumerConfig.localStorageKey,t)}hasKPIAlreadyFired(){return!!s.getSessionStorageValue(this.consumerConfig.isKPIFired,!0,!1)&&(o.debug(this.consumerConfig.brandKey+" Quality Traffic :: Already Fired"),!0)}recordDataFunction(){o.debug("Record Data :: Quality Traffic")}getConsumerConfig(){return this.consumerConfig}}t.QualityTrafficConsumer=a,t.default=a},89:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const n=i(807),o=i(917),s=i(275);class a extends s.default{constructor(e="Buying Intent Consumer",t=n.BuyingIntent){super(e,t),this.name=e,this.consumerConfig=t}initConsumer(){o.debug(`Init Consumer :: ${this.name}`),super.initConsumer()}recordDataFunction(){super.recordDataFunction()}}t.default=a},646:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TMOBTSQTConsumer=void 0;const n=i(964),o=i(867),s=i(917),a=i(564);class r extends a.default{constructor(e="Beyond The SmartPhone(BTS) Quality Traffic Consumer",t=n.QualityTraffic){super(e,t),this.elapsedTime=0,this.name=e,this.consumerConfig=t}initConsumer(){s.debug(`Init Consumer :: ${this.name}`),super.initConsumer(),o.getSessionStorageValue(this.consumerConfig.isKPIFired,!0,!1)||setInterval((()=>{if(o.getSessionStorageValue(this.consumerConfig.isKPIFired,!0,!1))return;const e=o.getSessionStorageValue(this.consumerConfig.storageKeyName,!0,!1);e&&e[n.TmobileCommon.brandKey]&&(this.elapsedTime+=n.TmobileCommon.runClock,o.registerTimeSpent(n.TmobileCommon.brandKey,this.elapsedTime,"session"),this.recordDataFunction())}),n.TmobileCommon.runClock)}recordDataFunction(){super.recordDataFunction(),s.debug(this.name," :: Record Data Function");let e="";const t=o.getSessionStorageValue(this.consumerConfig.storageKeyName,!0)||0;if(!o.getSessionStorageValue(this.consumerConfig.isKPIFired,!0,!1)&&o.getSessionStorageValue(this.consumerConfig.storageKeyName,!0))return t[n.TmobileCommon.brandKey].pageCount>=this.consumerConfig.newCustomer.pageCount&&t[n.TmobileCommon.brandKey].timeCount>=this.consumerConfig.newCustomer.timeCount&&(e=this.consumerConfig.adobe.prop72_V1),!e&&t[n.TmobileCommon.brandKey].pageCount>=this.consumerConfig.repeatCustomer.pageCount&&t[n.TmobileCommon.brandKey].timeCount>=this.consumerConfig.repeatCustomer.timeCount&&(e=this.consumerConfig.adobe.prop72_V2),e&&(s.debug(`${this.name} condition met`),s.debug(`${this.name} sent signals to CDL and event listener has been created`),this.consumerConfig.outcome=e,o.sendKpiSignals(this.consumerConfig),o.setSessionStorageValue(this.consumerConfig.isKPIFired,1)),!1}}t.TMOBTSQTConsumer=r,t.default=r},110:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const n=i(964),o=i(917),s=i(530);class a extends s.default{constructor(e="Buying Interest Consumer",t=n.BuyingInterest){super(e,t),this.name=e,this.consumerConfig=t}initConsumer(){o.debug(`${this.name} :: Init Consumer`),super.initConsumer()}recordDataFunction(){o.debug(`${this.name} :: Record Data Function`),super.recordDataFunction()}}t.default=a},182:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TMOEngagedVisitConsumer=void 0;const n=i(807),o=i(964),s=i(917),a=i(447);class r extends a.default{constructor(e="TMO Engaged Visit Consumer",t=n.EngagedVisit){super(e,t),this.name=e,this.consumerConfig=t,this.consumerConfig.brandKey=o.TmobileCommon.brandKey}initConsumer(){s.debug(`${this.name} :: Init Consumer`),super.initConsumer()}}t.TMOEngagedVisitConsumer=r,t.default=r},554:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TMOPSVConsumer=void 0;const n=i(964),o=i(917),s=i(51);class a extends s.default{constructor(e="TMO PSV Consumer",t=n.ProspectShoppingVisit){super(e,t),this.name=e,this.consumerConfig=t}initConsumer(){o.debug(`Init Consumer :: ${this.name}`),super.initConsumer()}recordDataFunction(){o.debug("PSV Record Data Function"),super.recordDataFunction()}}t.TMOPSVConsumer=a,t.default=a},509:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const n=i(726),o=i(646),s=i(807),a=i(964),r=i(89),u=i(182),c=i(110),g=i(554),m=i(867);class l extends n.KpiManager{constructor(){super(),this.setFlavorPageCount=()=>{m.urlChecker(a.QualityTraffic.prodUrl)&&(m.recordPageUrlVisited(a.QualityTraffic.KPI_Session,a.QualityTraffic.storageKeyName_pageUrlTrack,a.QualityTraffic.storageKeyName_pagCountTrack),m.registerPageVisit(a.TmobileCommon,a.QualityTraffic.storageKeyName_pagCountTrack,"session"))}}setupConsumers(){this.brandKey=a.TmobileCommon.brandKey,this.evConsumer=new u.default("TMO Engaged Visit-KPI",s.EngagedVisit),this.consumers.set("TMO Engaged Visit Consumer",this.evConsumer),m.isUserProspect()&&(this.buyingInterestConsumer=new c.default("Buying Interest-KPI",a.BuyingInterest),this.consumers.set("TMO Buying Interest Consumer",this.buyingInterestConsumer),this.psvConsumer=new g.default("TMO PSV-KPI",a.ProspectShoppingVisit),this.consumers.set("TMO PSV Consumer",this.psvConsumer),this.buyingIntentConsumer=new r.default("Buying Intent ::",s.BuyingIntent),this.consumers.set("Buying Intent Consumer",this.buyingIntentConsumer)),this.getBtsqtConsumer=new o.TMOBTSQTConsumer("TMO BTSQT-KPI",a.QualityTraffic),this.consumers.set("TMO_BTS QT Consumer",this.getBtsqtConsumer)}}t.default=l},726:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.KpiManager=void 0;const n=i(807),o=i(867),s=i(917);t.KpiManager=class{constructor(){this.consumers=new Map,s.debug("KPI Manager running"),this.analyticsDL=o.getDataLayer(),this._satellite=window[n.windowVariables.MT_KPI_satellite],this.alloy=window[n.windowVariables.MT_KPI_alloy],this.isPhoenix=o.isPhoenixPage()}initiateKPIs(){o.isPhoenixPage()?window[n.customEvents.MT_KPI_cdlPageLoadEvent]?(this.setupConsumers(),this.initiateAllConsumers()):(s.debug("KPI Manager listening to cdlPageLoadEvent"),window.addEventListener(n.customEvents.MT_KPI_cdlPageLoadEvent,function(){this.setupConsumers(),this.initiateAllConsumers()}.bind(this))):(this.setupConsumers(),this.initiateAllConsumers(),window.addEventListener(n.customEvents.MT_KPI_targetPageLoad,function(){this.setupConsumers(),this.initiateAllConsumers()}.bind(this)))}initiateAllConsumers(){o.recordPageUrlVisited(n.BuyingInterest.global,n.PageAndTimeKeys.VISITED_PAGE_LIST_SESSION_KEY,n.PageAndTimeKeys.VISITED_PAGE_COUNT_SESSION_KEY),o.recordPageUrlVisitedLOB(this.brandKey),this.setFlavorPageCount();try{const e=[];if(this.buyingInterestConsumer){const e=o.urlChecker(n.BuyingInterest.prodUrl);this.initiateBuyingInterest(e)}for(const[t,i]of this.consumers.entries())o.urlChecker(i.getConsumerConfig().prodUrl)?(i.initConsumer(),!i.getConsumerConfig().timerConfiguration||"BOTH"!==i.getConsumerConfig().timerConfiguration.userType&&!o.isUserProspect()||o.getSessionStorageValue(i.getConsumerConfig().isKPIFired,!0,!1)||e.push(i.getConsumerConfig().timerConfiguration)):(s.debug(t+" did not meet page requirements."),this.consumers.delete(t));o.globalClock(e,this.brandKey)}catch(e){s.debug("Error initiating consumer: "+e)}}initiateBuyingInterest(e){e&&!o.getSessionStorageValue(n.BuyingInterest.isKPIFired,!0,!1)&&o.isUserProspect()&&(this.buyingInterestConsumer.resetKPITimer(),o.recordPageUrlVisited(n.BuyingInterest.global,"kpi_pgNm_allusers","kpi_pgCount_allusers"),o.registerPageVisit(n.BuyingInterest.global,"kpi_pgCount_allusers","globalpageCount"),o.getSessionStorageValue(n.ProspectShoppingVisit.isKPIFired,!0,!1)&&this.buyingInterestConsumer.initiateBuyingInterest())}}},867:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=t.isDefinedNotBlank=t.isPresent=t.isObjEmpty=t.isString=t.isDefined=t.isDefinedNotNull=t.parseObj=t.isArray=t.isFalse=t.isTrue=t.isBoolean=t.numberOfDaysBetween=t.doesDigitalDataInternalExist=t.urlChecker=t.locale=t.currentTime=t.diff=t.cumulativeSessionProps=t.getConfig=t.triggerEvent=t.sendAdobeEvent=t.removeLocalStorageValue=t.getSessionStorageValue=t.setSessionStorageValue=t.getLocalStorageValue=t.setLocalStorageValue=t.sanitizeUntrusted=t.getCookie=t.isUserProspect=t.getDataLayer=t.isPhoenixPage=t.fetchDataLayerValue=t.isValueTrue=t.sendMediaTagSignals=t.sendKpiSignals=t.getLOBTimeKey=t.recordPageUrlVisitedLOB=t.recordPageUrlVisited=t.registerSessionVisit=t.registerTimeSpent=t.setCookie=t.registerPageVisit=t.hasConsumerTimerMatched=t.globalClock=t.timeOnSite=void 0;const n=i(917),o=i(807),s=i(217),a=i(530);function r(e,t,i){let s=!1;e.forEach((e=>{e.timerList.forEach((a=>{a.hasBeenTriggered||S(e.isKPIFired,!0,0)||(s=!1,a.LOB&&i>=a.timeCount?(n.debug(e.customEventName+" is being triggered at "+i),s=!0):(t>=a.timeCount||T("KPI_Config",!0,!1)&&T("KPI_Config",!0,!1)[o.common.lob].session_time_count>=a.timeCount)&&(n.debug(e.customEventName+" is being triggered at "+t),s=!0),s&&(C(e.customEventName),a.hasBeenTriggered=!0))}))}))}function u(e,t,i){let n=!1;const o=S(t,!0,!1),s=S(i,!0,1);return o.length>=2&&o.shift(),o?o[o.length-1]!==location.hostname+location.pathname?(o.push(location.hostname+location.pathname),I(t,o),I(i,s+1),n=!0):n=!1:(I(t,[location.hostname+location.pathname]),I(i,1),n=!0),n}function c(e){let t;switch(e){case o.LineOfBusiness.BIZIL:t=o.PageAndTimeKeys.BIZIL_TIME_SPENT_IN_SESSION_KEY;break;case o.LineOfBusiness.HINT:t=o.PageAndTimeKeys.HINT_TIME_SPENT_IN_SESSION_KEY;break;case o.LineOfBusiness.METRO:t=o.PageAndTimeKeys.METRO_TIME_SPENT_IN_SESSION_KEY;break;case o.LineOfBusiness.PREPAID:t=o.PageAndTimeKeys.PREPAID_TIME_SPENT_IN_SESSION_KEY;break;case o.LineOfBusiness.TFB:t=o.PageAndTimeKeys.TFB_TIME_SPENT_IN_SESSION_KEY;break;default:t=o.PageAndTimeKeys.TMO_TIME_SPENT_IN_SESSION_KEY}return t}function g(e,t,i,o,s){try{return"function"===s&&e&&"function"==typeof e[t]?e[t]():!(!e[t]||!(e[t][i]&&e[t][i].includes(o)||!i&&e[t].includes(o)))&&o}catch(e){n.debug("isValueTrue err",e)}}function m(){return window[o.windowVariables.MT_KPI_phoenix]}function l(){return window[o.windowVariables.MT_KPI_digitalData]}function d(e){try{return b(e)||(e=""),e=e.replace(/["<>()']/gim,"!!")}catch(e){n.debug("sanitizeUntrusted : ",e)}return""}function _(e,t){try{if(!e||!t)return;window.localStorage.setItem(e,JSON.stringify(t))}catch(e){n.debug("Error setLocalStorageValue : ",e)}}function T(e,t=!1,i={}){try{if(!e)return i;const n=window.localStorage.getItem(e);if(n)return t?JSON.parse(n):n}catch(e){n.debug("Error getLocalStorageValue : ",e)}return i}function I(e,t){try{if(!e||null==t)return;window.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){n.debug("setSessionStorageValue err")}}function S(e,t=!1,i={}){try{const n=window.sessionStorage.getItem(e);if(!e)return i;if(n)return t?JSON.parse(n):n}catch(e){n.debug("Error getSessionStorageValue : ",e)}return i}function C(e,t,i){let o;"function"==typeof window.CustomEvent?o=new CustomEvent(e,{detail:t}):"function"==typeof window.Event&&(o=new Event(e)),o?window.dispatchEvent(o):n.debug("triggerEvent(): browser does not support custom event. agent= "+navigator.userAgent)}function p(){return T("KPI_Config",!0,{})}function E(e){try{const t=p(),i=Object.keys(t),n={};if(!t)return;return i.forEach((i=>{"TFB"==e&&(n.TFB_totalTimeSpent=t[e].total_time_counts+(t[e].session_time_count||0)),"HINT"==e&&(n.HINT_totalTimeSpent=t[e].total_time_counts+t[e].session_time_count||0),"global"==e&&(n.global_totalVisits=t[e].visits||1,n.global_totalTimeSpent=(t[e].total_time_counts||0)+(t[e].session_time_count||0),n.global_totalVisits>1&&(n.global_totalPageCounts=t[e].total_page_counts+(t[e].session_page_count||0)))})),n}catch(e){n.debug("cumulativeSessionProps err",e)}}function h(){return(new Date).toLocaleDateString()}function f(e){return"boolean"==typeof e}function P(e){return b(e)&&null!==e}function b(e){return void 0!==e}function y(e){return"string"==typeof e&&""!=e}function K(e){return b(e)&&0===Object.keys(e).length}t.timeOnSite=function(){this.timeDiff>=0?(n.debug(`${this.name} :: calculating to meet the time difference ${this.timeDiff}`),this.timeoutID=setTimeout(function(){this.elapsedTime+=this.timeDiff,n.debug(`${this.name} :: matched time spent limit ${this.elapsedTime}`),this.userActivity=!0,this.recordDataFunction()}.bind(this),this.timeDiff)):b(this.kpiType)||(n.debug(`${this.name} :: matched time spent limit ${this.timeDiff}`),this.userActivity=!0,this.recordDataFunction.call(this))},t.globalClock=function(e,t){const i=S(o.PageAndTimeKeys.TIME_SPENT_IN_SESSION_KEY,!0,0),s=c(t),u=S(s,!0,0);if(r(e,i,u),Object.keys(e).length>0&&(o.common.maxTimeCalculation>i||o.common.maxTimeCalculation>u)){const t=setInterval((()=>{const i=S(o.PageAndTimeKeys.TIME_SPENT_IN_SESSION_KEY,!0,0),c=S(s,!0,0),g=i+o.common.timerInterval,m=c+o.common.timerInterval;I(o.PageAndTimeKeys.TIME_SPENT_IN_SESSION_KEY,g),I(s,m),this.isUserProspect()&&a.default.updateTimer(),r(e,g,u),g>=o.common.maxTimeCalculation&&m>=o.common.maxTimeCalculation&&(n.debug("Stopping global clock. Total time: "+g+" LOB time: "+m),clearInterval(t))}),o.common.timerInterval,e)}},t.hasConsumerTimerMatched=r,t.registerPageVisit=function(e,t,i){try{let n;"session"===i?(n=S("KPI_Session",!0),K(n)&&(n[`${e.brandKey}`]={}),n[e.brandKey]&&(n[e.brandKey].pageCount=S(t,!0)),I("KPI_Session",n)):(n=p(),K(n)&&(n[`${o.common.lob}`]={}),n[o.common.lob].session_page_count=S(t,!0),_("KPI_Config",n))}catch(e){n.debug("registerPageVisit err",e)}},t.setCookie=function(e,t,i,n,o){const s=new Date,a=encodeURIComponent;s.setTime(s.getTime()+60*i*1e3);const r="expires="+s.toUTCString();document.cookie=a(e)+"="+a(t)+";"+r+(o?"; domain="+o:"")+"; path="+(n||"/")+";SameSite=None;Secure;"},t.registerTimeSpent=function(e,t,i,s){try{let n=T("KPI_Config",!0);if("session"===i)return n=S("KPI_Session",!0,!1),n[e].timeCount=t||n[e].timeCount||0,void I("KPI_Session",n);o.common.lob||(n=this.dft),n[o.common.lob].session_time_count=t,s&&(n[o.common.lob].session_time_countB=s),_("KPI_Config",n)}catch(e){n.debug("registerTimeSpent err",e)}},t.registerSessionVisit=function(e,t,i){let n=T("KPI_Config",!0,!1);const o=`${e}_totalTimeSpent`;K(n)||K(n[e])?(n=t,n[e].initialDate=h(),n[e].session_time_count=i||0):b(n[e])?n&&new Date(n[e].initialDate)0){let t=(" "+document.cookie).split(";");return t=t.filter((t=>0==t.indexOf(` ${e}=`))),0==t.length||0==t.length?"":decodeURIComponent(d(t[0].substr(e.length+2)))}return""}catch(e){n.debug("Error getCookie : ",e)}},t.sanitizeUntrusted=d,t.setLocalStorageValue=_,t.getLocalStorageValue=T,t.setSessionStorageValue=I,t.getSessionStorageValue=S,t.removeLocalStorageValue=function(e){try{window.localStorage.removeItem(e)}catch(e){n.debug("Error removeLocalStorageValue : ",e)}},t.sendAdobeEvent=function(e,t,i,n){window.s&&(window.s.linkTrackVars="events,pageName,eVar5,prop35",window.s.events=t,window.s.linkTrackEvents=t,window.s.prop35=i,window.s.prop72=n,window.s.tl(this,"o",e))},t.triggerEvent=C,t.getConfig=p,t.cumulativeSessionProps=E,t.diff=function(e,t,i){try{return Math.round(Math.abs((e-t)/i))}catch(e){n.debug("diff err")}},t.currentTime=function(){return(new Date).getTime()},t.locale=h,t.urlChecker=function(e){const t=location.pathname,i=location.host+location.pathname;try{for(let n=0;n=1&&o.Exclude.indexOf(t)>0)return!1;if(o.Exclude){let e=!0;return o.Exclude.map((i=>{e=!i.test(t)})),e}if(o.Include&&o.Include.length>0){if("ALL"===o.Include)return!0;for(let e=0;e0},t.isDefinedNotBlank=function(e){return b(e)&&e.length>0},t.isFunction=function(e){return"function"==typeof e}}},t={};function i(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,i),s.exports}(new(i(509).default)).initiateKPIs()})(); //# sourceMappingURL=kpi-manager.js.map